package org.hpm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.hpm.bo.HpmUserBO;
import org.hpm.common.api.vo.HpmResult;
import org.hpm.common.api.vo.Result;
import org.hpm.entity.HpmUsers;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @description: 用户表
 * @author: jacklin
 * @date: 2021-11-24
 * @version: V1.0
 */
public interface IHpmUsersService extends IService<HpmUsers> {

    /**
     * 校验用户名是否存在
     *
     * @author: jacklin
     * @since 2022/6/21 22:06
     **/
    boolean usernameIsExist(String username);

    /**
     * 用户注册
     *
     * @author: jacklin
     * @since 2022/6/21 22:33
     **/
    HpmResult<?> createUser(HpmUserBO hpmUserBO, HttpServletRequest request, HttpServletResponse response);


    /**
     * 用户登录
     *
     * @author: jacklin
     * @since 2022/8/30 22:18
     **/
    HpmResult<?> login(HpmUserBO hpmUserBO, HttpServletRequest request, HttpServletResponse response);

    /**
     * 退出登录
     *
     * @author: jacklin
     * @since 2022/8/31 11:34
     **/
    HpmResult logout(String userId, HttpServletRequest request, HttpServletResponse response);
}
